package view;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.control.Menu;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;

public class jisuanqi extends Application{
	private TopPane topPane = new TopPane();
	private CenterPane centerPane = new CenterPane(topPane.getTextField());
	@Override
	public void start(Stage arg0) throws Exception {
		BorderPane pane = new BorderPane();
		pane.setTop(topPane);
		pane.setCenter(centerPane);
		
		MenuBar mB = new MenuBar();
		Menu m1 = new Menu("编辑");
		Menu m2 = new Menu("帮助");
		MenuItem m11 = new MenuItem("复制");
		MenuItem m22 = new MenuItem("粘贴");
		m1.getItems().addAll(m11,m22);
		mB.getMenus().addAll(m1,m2);
	    
		GridPane gP = new GridPane();
		gP.setStyle("-fx-background-color:#d3d7d4");
		gP.add(mB, 0, 0);
		gP.add(pane, 0, 1);
		
		Scene scene = new Scene(gP,274,370);
		arg0.setResizable(false);
		arg0.setTitle("计算器");
		arg0.setScene(scene);
		arg0.show();
	}
	public static void main(String[] args) {
		Application.launch(args);
	}
}
